//
//  LSZFeedbackListManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/8/15.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZFeedbackListManager.h"

@implementation LSZFeedbackListManager
-(id)initWithFeedbackList :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        self.mutMgArray  = [[NSMutableArray alloc]init];
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayData = dic[@"data"];
        NSMutableArray * arrayMg = [[NSMutableArray alloc]init];
        for (NSDictionary * diction in arrayData) {
            LSZFeedbackListMg * mg = [[LSZFeedbackListMg alloc]init];
            mg.id_id = NullStringjudgment(NSStr(diction[@"id"]));
            mg.ip_add = NullStringjudgment(NSStr(diction[@"ip_add"]));
            mg.uid = NullStringjudgment(NSStr(diction[@"uid"]));
            mg.gnote = NullStringjudgment(NSStr(diction[@"gnote"]));
            mg.type = NullStringjudgment(NSStr(diction[@"type"]));
            NSString * time = [LSZSpecialPackaging GetThePreviousTime:diction[@"add_time"]];
            mg.add_time = time;

            mg.status = NullStringjudgment(NSStr(diction[@"status"]));
            mg.phone = NullStringjudgment(NSStr(diction[@"phone"]));
            mg.avatar = NullStringjudgment(NSStr(diction[@"avatar"]));
            mg.username = NullStringjudgment(NSStr(diction[@"username"]));
            mg.reply = NullStringjudgment(NSStr(diction[@"reply"]));
            mg.reply_time = NullStringjudgment(NSStr(diction[@"reply_time"]));
            [arrayMg addObject:mg];
        }
        self.mutMgArray = arrayMg;
    }
    return self;
}
@end
@implementation LSZFeedbackListMg
@end
